/// @tags:
#include <cstdio>
#include <functional>
#include <iostream>
#include <numeric>

using std::cin, std::cout, std::endl;

namespace BlueQuantum {

constexpr int maxn = 2e5 + 2;

struct Node {
  long long x, v;
  bool operator<(const Node &rhs) const { return x < rhs.x; }
} a[maxn];

int main() {
  long long n, m;
  cin >> n >> m;
  for (int i = 1; i <= m; ++i) {
    cin >> a[i].x >> a[i].v;
  }
  std::sort(a + 1, a + m + 1);
  long long ans = 0;
  if (m == 0) {
    cout << ((n & 1) ? "Takahashi" : "Aoki");
    return 0;
  }
  ans ^= a[1].x - 1;
  ans ^= n - a[m].x;
  for (int i = 1; i < m; ++i) {
    if (a[i].x == a[i + 1].x) continue;
    ans ^= !(a[i].v ^ a[i + 1].v);
  }
  cout << (ans ? "Takahashi" : "Aoki");
  return 0;
}

}  // namespace BlueQuantum

int main() {
#ifndef ONLINE_JUDGE
#ifdef LOCAL
  freopen("/tmp/CodeTmp/testdata.in", "r", stdin);
  freopen("/tmp/CodeTmp/testdata.out", "w", stdout);
#else
  freopen("C - 01 Game.in", "r", stdin);
  freopen("C - 01 Game.out", "w", stdout);
#endif
#endif

  std::ios::sync_with_stdio(false), cin.tie(NULL), cout.tie(NULL);
  return BlueQuantum::main();
}
